<template>
  <div id="user">
    <el-form :inline="true" :model="formInline" class="demo-form-inline">
      <el-form-item label="用户名">
        <el-input v-model="formInline.username" placeholder="用户名"></el-input>
      </el-form-item>
      <el-form-item label="姓名">
        <el-input v-model="formInline.name" placeholder="姓名"></el-input>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="onSubmit">查询</el-button>
      </el-form-item>
    </el-form>

    <el-table
      ref="multipleTable"
      :data="tableData"
      tooltip-effect="dark"
      style="width: 100%"
      @selection-change="handleSelectionChange"
    >
      <el-table-column type="selection" width="55"> </el-table-column>
      <el-table-column label="ID" width="120">
        <template slot-scope="scope">{{ scope.row.id }}</template>
      </el-table-column>
      <el-table-column prop="username" label="用户名" width="120">
      </el-table-column>
      <el-table-column prop="name" label="姓名" width="120"></el-table-column>
      <el-table-column label="性别" width="120">
        <template slot-scope="scope">
          {{
            scope.row.genderId == 1
              ? "男"
              : scope.row.genderId == 2
              ? "女"
              : "未知"
          }}
        </template>
      </el-table-column>
      <el-table-column prop="telephone" label="电话号码" width="120">
      </el-table-column>
      <el-table-column prop="address" label="地址" width="120">
      </el-table-column>
      <el-table-column prop="userDescribe" label="描述" show-overflow-tooltip>
      </el-table-column>
      
    </el-table>
    <el-pagination background layout="prev, pager, next" :total="1000">
      </el-pagination>
    <div style="margin-top: 20px">
      <el-button @click="toggleSelection()">取消选择</el-button>
      
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      formInline: {
        username: "",
        name: "",
      },
      tableData: [
        {
          id: 1,
          username: "aa",
          name: "aa",
          genderId: "1",
          telephone: "111111",
          address: "wokeqp",
          userDescribe: "没有添加描述",
        },
      ],
    };
  },
  methods: {
    onSubmit() {
      console.log("submit!");
    },
  },
};
</script>
<style>
</style>